/*
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */
package br.com.menosehmais.controller.view;

import br.com.caelum.vraptor.Get;
import br.com.caelum.vraptor.Path;
import br.com.caelum.vraptor.Resource;
import br.com.caelum.vraptor.Result;
import br.com.menosehmais.framework.persistence.Id;

/**
 *
 * @author RafaelRosa
 */
@Resource
public class QRCodeController {

    private final Result result;

    public QRCodeController(Result result) {
        this.result = result;
    }

    @Get
    @Path("/qr/portlet/{id:" + Id.REGEX + "}")
    public void portlet(Id id) {
        result.permanentlyRedirectTo("/portlet/description#/?idPortlet=" + id.toString());
    }
}
